{% load i18n sekizai_tags  %}
<!-- 
#load cms_js_tags -->
{% addtoblock "js" %}<script type="text/javascript" src="{{ STATIC_URL }}cms/js/libs/swfobject.min.js"></script>{% endaddtoblock %}
{% addtoblock "js" %}
<script type="text/javascript">
//<![CDATA[
(function () {
	var flashvars = {
		'movie': 					'{{ object.get_movie }}',
		{% if object.image %}
		'image': 					'{{ object.image.url }}',
		{% endif %}
		'autoplay': 				'{{ object.auto_play|bool }}',
		'loop': 					'{{ object.loop|bool }}',
		'autohide': 				'{{ object.auto_hide|bool }}',
		'fullscreen': 				'{{ object.fullscreen|bool }}',
		'color_text': 				'0x{{ object.textcolor }}',
		'color_seekbar': 			'0x{{ object.seekbarcolor }}',
		'color_loadingbar': 		'0x{{ object.loadingbarcolor }}',
		'color_seekbarbg': 			'0x{{ object.seekbarbgcolor }}',
		'color_button_out': 		'0x{{ object.buttonoutcolor }}',
		'color_button_over': 		'0x{{ object.buttonovercolor }}',
		'color_button_highlight': 	'0x{{ object.buttonhighlightcolor }}'
	};
	var params = {
		allowfullscreen: 	'true',
		allowscriptaccess: 	'always',
		bgcolor: 			'#{{ object.bgcolor }}',
		wmode: 				'opaque'
	};
	var attributes = { align: 'middle' };
	
	// load
	swfobject.embedSWF('{{ STATIC_URL }}cms/swf/player.swf', 'video-plugin-{{ object.id }}', '{{ object.get_width }}', '{{ object.get_height }}', '9', '{{ STATIC_URL }}cms/swf/expressInstall.swf', flashvars, params, attributes);
})();
//]]>
</script>
{% endaddtoblock %}

<div class="plugin_video">
	<object id="video-plugin-{{ object.id }}" width="{{ object.get_width }}" height="{{ object.get_height }}" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" >
		<param name="movie" value="{{ STATIC_URL }}cms/swf/player.swf"/>
		<param name="allowFullScreen" value="true" />
		<param name="allowScriptAccess" value="always" />
		<param name="allowFullScreen" value="true" />
		<param name="quality" value="autohigh" />
		<param name="wmode" value="opaque" />
		<param name="bgcolor" value="#{{ object.bgcolor }}" />
		<param name="flashvars" value="movie={{ object.get_movie }}&amp;{% if object.image %}image={{ object.image.url }}&amp;{% endif %}autoplay={{ object.auto_play|bool }}&amp;loop={{ object.loop|bool }}&amp;autohide={{ object.auto_hide|bool }}&amp;fullscreen={{ object.fullscreen|bool }}&amp;color_text=0x{{ object.textcolor }}&amp;color_seekbar=0x{{ object.seekbarcolor }}&amp;color_loadingbar=0x{{ object.loadingbarcolor }}&amp;color_seekbarbg=0x{{ object.seekbarbgcolor }}&amp;color_button_out=0x{{ object.buttonoutcolor }}&amp;color_button_over=0x{{ object.buttonovercolor }}&amp;color_button_highlight=0x{{ object.buttonhighlightcolor }}" />
			<!--[if !IE]>-->
			<object width="{{ object.get_width }}" height="{{ object.get_height }}" data="{{ STATIC_URL }}cms/swf/player.swf" type="application/x-shockwave-flash">
			<param name="allowFullScreen" value="true" />
			<param name="allowScriptAccess" value="always" />
			<param name="allowFullScreen" value="true" />
			<param name="quality" value="autohigh" />
			<param name="wmode" value="opaque" />
			<param name="bgcolor" value="#{{ object.bgcolor }}" />
			<param name="flashvars" value="movie={{ object.get_movie }}&amp;{% if object.image %}image={{ object.image.url }}&amp;{% endif %}autoplay={{ object.auto_play|bool }}&amp;loop={{ object.loop|bool }}&amp;autohide={{ object.auto_hide|bool }}&amp;fullscreen={{ object.fullscreen|bool }}&amp;color_text=0x{{ object.textcolor }}&amp;color_seekbar=0x{{ object.seekbarcolor }}&amp;color_loadingbar=0x{{ object.loadingbarcolor }}&amp;color_seekbarbg=0x{{ object.seekbarbgcolor }}&amp;color_button_out=0x{{ object.buttonoutcolor }}&amp;color_button_over=0x{{ object.buttonovercolor }}&amp;color_button_highlight=0x{{ object.buttonhighlightcolor }}" />
			<!--<![endif]-->
		<!-- alternate content -->
		{% trans "Missing flash plugin. Please download the latest Adobe Flash Player: " %}<br />
		<a href="https://www.adobe.com/go/getflashplayer">
			<img alt="{% trans 'Get Adobe Flash Player' %}" src="{{ STATIC_URL }}cms/images/plugins/get_flash_player.gif" />
		</a>
		<!-- /alternate content -->
			<!--[if !IE]>-->
			</object>
			<!--<![endif]-->
	</object>
</div>
